from flask import Blueprint
from flask_restful import Api
from . import views

resource_bp = Blueprint('resource',__name__,url_prefix='/resource')
#注册蓝图到Api中
api = Api(resource_bp)
#路由格式
api.add_resource(views.BookResource,'/book',endpoint='resource-book')
api.add_resource(views.AuthorResource,'/author',endpoint='resource-author')